import router from './index'
import { getUserInfo } from 'vue-xiaobu-utils'
router.beforeEach((to, from, next) => {
  console.warn(parseInt(getUserInfo().IS_LOGIN) === 1)
  // 判断是否需要登录
  if (parseInt(getUserInfo().IS_LOGIN) === 1) {
    next({ name: 'loginIndex' })
  } else {
    next({ name: 'loginIndex' })
  }
  next()
})

export default router
